#pragma once
#include <queue>
#include <map>
#include "Cell.h"
#include <boost/thread.hpp>
#include <boost/interprocess/ipc/message_queue.hpp>
class Processor
{
public:

	Processor(void){};

	virtual ~Processor(void) {};
	
	void startThread() { procThread = boost::thread(&Processor::ProcessingLogic, this); }
	void join() { procThread.join(); }
	queue<Cell*>& qmQ() 
	{ 
		static queue<Cell*> qmQ;
		return qmQ;
	}
	multimap<int*, Cell*>& objfinder() 
	{
		static multimap<int*, Cell*> objfinder;
		return objfinder; 
	}
protected:
	boost::condition_variable finished;
	boost::mutex QmQMutex;
	boost::mutex CPMutex;
	virtual void ProcessingLogic() = 0;
private:
	boost::thread procThread;
	
	
	
};

